3.1.5 \(\int \frac {(a+b x^2) (c+d x^2)}{e+f x^2} \, dx\)

Optimal. Leaf size=81 \[ \frac {(b e-a f) (d e-c f) \tan ^{-1}\left (\frac {\sqrt {f} x}{\sqrt {e}}\right )}{\sqrt {e} f^{5/2}}-\frac {x (-2 a d f-3 b c f+3 b d e)}{3 f^2}+\frac {d x \left (a+b x^2\right )}{3 f} \]

________________________________________________________________________________________

Rubi [A]  time = 0.08, antiderivative size = 81, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 24, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.125, Rules used = {528, 388, 205} \begin {gather*} -\frac {x (-2 a d f-3 b c f+3 b d e)}{3 f^2}+\frac {(b e-a f) (d e-c f) \tan ^{-1}\left (\frac {\sqrt {f} x}{\sqrt {e}}\right )}{\sqrt {e} f^{5/2}}+\frac {d x \left (a+b x^2\right )}{3 f} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[((a + b*x^2)*(c + d*x^2))/(e + f*x^2),x]

[Out]

-((3*b*d*e - 3*b*c*f - 2*a*d*f)*x)/(3*f^2) + (d*x*(a + b*x^2))/(3*f) + ((b*e - a*f)*(d*e - c*f)*ArcTan[(Sqrt[f
]*x)/Sqrt[e]])/(Sqrt[e]*f^(5/2))

Rule 205

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]*ArcTan[x/Rt[a/b, 2]])/a, x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rule 388

Int[((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_)), x_Symbol] :> Simp[(d*x*(a + b*x^n)^(p + 1))/(b*(n*
(p + 1) + 1)), x] - Dist[(a*d - b*c*(n*(p + 1) + 1))/(b*(n*(p + 1) + 1)), Int[(a + b*x^n)^p, x], x] /; FreeQ[{
a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && NeQ[n*(p + 1) + 1, 0]

Rule 528

Int[((a_) + (b_.)*(x_)^(n_))^(p_.)*((c_) + (d_.)*(x_)^(n_))^(q_.)*((e_) + (f_.)*(x_)^(n_)), x_Symbol] :> Simp[
(f*x*(a + b*x^n)^(p + 1)*(c + d*x^n)^q)/(b*(n*(p + q + 1) + 1)), x] + Dist[1/(b*(n*(p + q + 1) + 1)), Int[(a +
 b*x^n)^p*(c + d*x^n)^(q - 1)*Simp[c*(b*e - a*f + b*e*n*(p + q + 1)) + (d*(b*e - a*f) + f*n*q*(b*c - a*d) + b*
d*e*n*(p + q + 1))*x^n, x], x], x] /; FreeQ[{a, b, c, d, e, f, n, p}, x] && GtQ[q, 0] && NeQ[n*(p + q + 1) + 1
, 0]

Rubi steps

\begin {align*} \int \frac {\left (a+b x^2\right ) \left (c+d x^2\right )}{e+f x^2} \, dx &=\frac {d x \left (a+b x^2\right )}{3 f}+\frac {\int \frac {-a (d e-3 c f)-(3 b d e-3 b c f-2 a d f) x^2}{e+f x^2} \, dx}{3 f}\\ &=-\frac {(3 b d e-3 b c f-2 a d f) x}{3 f^2}+\frac {d x \left (a+b x^2\right )}{3 f}+\frac {((b e-a f) (d e-c f)) \int \frac {1}{e+f x^2} \, dx}{f^2}\\ &=-\frac {(3 b d e-3 b c f-2 a d f) x}{3 f^2}+\frac {d x \left (a+b x^2\right )}{3 f}+\frac {(b e-a f) (d e-c f) \tan ^{-1}\left (\frac {\sqrt {f} x}{\sqrt {e}}\right )}{\sqrt {e} f^{5/2}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.05, size = 72, normalized size = 0.89 \begin {gather*} \frac {(b e-a f) (d e-c f) \tan ^{-1}\left (\frac {\sqrt {f} x}{\sqrt {e}}\right )}{\sqrt {e} f^{5/2}}+\frac {x (a d f+b c f-b d e)}{f^2}+\frac {b d x^3}{3 f} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[((a + b*x^2)*(c + d*x^2))/(e + f*x^2),x]

[Out]

((-(b*d*e) + b*c*f + a*d*f)*x)/f^2 + (b*d*x^3)/(3*f) + ((b*e - a*f)*(d*e - c*f)*ArcTan[(Sqrt[f]*x)/Sqrt[e]])/(
Sqrt[e]*f^(5/2))

________________________________________________________________________________________

IntegrateAlgebraic [F]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\left (a+b x^2\right ) \left (c+d x^2\right )}{e+f x^2} \, dx \end {gather*}

Verification is not applicable to the result.

[In]

IntegrateAlgebraic[((a + b*x^2)*(c + d*x^2))/(e + f*x^2),x]

[Out]

IntegrateAlgebraic[((a + b*x^2)*(c + d*x^2))/(e + f*x^2), x]

________________________________________________________________________________________

fricas [A]  time = 1.42, size = 191, normalized size = 2.36 \begin {gather*} \left [\frac {2 \, b d e f^{2} x^{3} - 3 \, {\left (b d e^{2} + a c f^{2} - {\left (b c + a d\right )} e f\right )} \sqrt {-e f} \log \left (\frac {f x^{2} - 2 \, \sqrt {-e f} x - e}{f x^{2} + e}\right ) - 6 \, {\left (b d e^{2} f - {\left (b c + a d\right )} e f^{2}\right )} x}{6 \, e f^{3}}, \frac {b d e f^{2} x^{3} + 3 \, {\left (b d e^{2} + a c f^{2} - {\left (b c + a d\right )} e f\right )} \sqrt {e f} \arctan \left (\frac {\sqrt {e f} x}{e}\right ) - 3 \, {\left (b d e^{2} f - {\left (b c + a d\right )} e f^{2}\right )} x}{3 \, e f^{3}}\right ] \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x^2+a)*(d*x^2+c)/(f*x^2+e),x, algorithm="fricas")

[Out]

[1/6*(2*b*d*e*f^2*x^3 - 3*(b*d*e^2 + a*c*f^2 - (b*c + a*d)*e*f)*sqrt(-e*f)*log((f*x^2 - 2*sqrt(-e*f)*x - e)/(f
*x^2 + e)) - 6*(b*d*e^2*f - (b*c + a*d)*e*f^2)*x)/(e*f^3), 1/3*(b*d*e*f^2*x^3 + 3*(b*d*e^2 + a*c*f^2 - (b*c +
a*d)*e*f)*sqrt(e*f)*arctan(sqrt(e*f)*x/e) - 3*(b*d*e^2*f - (b*c + a*d)*e*f^2)*x)/(e*f^3)]

________________________________________________________________________________________

giac [A]  time = 0.31, size = 80, normalized size = 0.99 \begin {gather*} \frac {{\left (a c f^{2} - b c f e - a d f e + b d e^{2}\right )} \arctan \left (\sqrt {f} x e^{\left (-\frac {1}{2}\right )}\right ) e^{\left (-\frac {1}{2}\right )}}{f^{\frac {5}{2}}} + \frac {b d f^{2} x^{3} + 3 \, b c f^{2} x + 3 \, a d f^{2} x - 3 \, b d f x e}{3 \, f^{3}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x^2+a)*(d*x^2+c)/(f*x^2+e),x, algorithm="giac")

[Out]

(a*c*f^2 - b*c*f*e - a*d*f*e + b*d*e^2)*arctan(sqrt(f)*x*e^(-1/2))*e^(-1/2)/f^(5/2) + 1/3*(b*d*f^2*x^3 + 3*b*c
*f^2*x + 3*a*d*f^2*x - 3*b*d*f*x*e)/f^3

________________________________________________________________________________________

maple [A]  time = 0.01, size = 119, normalized size = 1.47 \begin {gather*} \frac {b d \,x^{3}}{3 f}+\frac {a c \arctan \left (\frac {f x}{\sqrt {e f}}\right )}{\sqrt {e f}}-\frac {a d e \arctan \left (\frac {f x}{\sqrt {e f}}\right )}{\sqrt {e f}\, f}-\frac {b c e \arctan \left (\frac {f x}{\sqrt {e f}}\right )}{\sqrt {e f}\, f}+\frac {b d \,e^{2} \arctan \left (\frac {f x}{\sqrt {e f}}\right )}{\sqrt {e f}\, f^{2}}+\frac {a d x}{f}+\frac {b c x}{f}-\frac {b d e x}{f^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((b*x^2+a)*(d*x^2+c)/(f*x^2+e),x)

[Out]

1/3/f*x^3*b*d+1/f*a*d*x+1/f*b*c*x-1/f^2*b*d*e*x+1/(e*f)^(1/2)*arctan(f*x/(e*f)^(1/2))*a*c-1/f/(e*f)^(1/2)*arct
an(f*x/(e*f)^(1/2))*a*d*e-1/f/(e*f)^(1/2)*arctan(f*x/(e*f)^(1/2))*b*c*e+1/f^2/(e*f)^(1/2)*arctan(f*x/(e*f)^(1/
2))*b*d*e^2

________________________________________________________________________________________

maxima [A]  time = 1.24, size = 74, normalized size = 0.91 \begin {gather*} \frac {{\left (b d e^{2} + a c f^{2} - {\left (b c + a d\right )} e f\right )} \arctan \left (\frac {f x}{\sqrt {e f}}\right )}{\sqrt {e f} f^{2}} + \frac {b d f x^{3} - 3 \, {\left (b d e - {\left (b c + a d\right )} f\right )} x}{3 \, f^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x^2+a)*(d*x^2+c)/(f*x^2+e),x, algorithm="maxima")

[Out]

(b*d*e^2 + a*c*f^2 - (b*c + a*d)*e*f)*arctan(f*x/sqrt(e*f))/(sqrt(e*f)*f^2) + 1/3*(b*d*f*x^3 - 3*(b*d*e - (b*c
 + a*d)*f)*x)/f^2

________________________________________________________________________________________

mupad [B]  time = 0.11, size = 108, normalized size = 1.33 \begin {gather*} x\,\left (\frac {a\,d+b\,c}{f}-\frac {b\,d\,e}{f^2}\right )+\frac {b\,d\,x^3}{3\,f}+\frac {\mathrm {atan}\left (\frac {\sqrt {f}\,x\,\left (a\,f-b\,e\right )\,\left (c\,f-d\,e\right )}{\sqrt {e}\,\left (a\,c\,f^2+b\,d\,e^2-a\,d\,e\,f-b\,c\,e\,f\right )}\right )\,\left (a\,f-b\,e\right )\,\left (c\,f-d\,e\right )}{\sqrt {e}\,f^{5/2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((a + b*x^2)*(c + d*x^2))/(e + f*x^2),x)

[Out]

x*((a*d + b*c)/f - (b*d*e)/f^2) + (b*d*x^3)/(3*f) + (atan((f^(1/2)*x*(a*f - b*e)*(c*f - d*e))/(e^(1/2)*(a*c*f^
2 + b*d*e^2 - a*d*e*f - b*c*e*f)))*(a*f - b*e)*(c*f - d*e))/(e^(1/2)*f^(5/2))

________________________________________________________________________________________

sympy [B]  time = 0.62, size = 206, normalized size = 2.54 \begin {gather*} \frac {b d x^{3}}{3 f} + x \left (\frac {a d}{f} + \frac {b c}{f} - \frac {b d e}{f^{2}}\right ) - \frac {\sqrt {- \frac {1}{e f^{5}}} \left (a f - b e\right ) \left (c f - d e\right ) \log {\left (- \frac {e f^{2} \sqrt {- \frac {1}{e f^{5}}} \left (a f - b e\right ) \left (c f - d e\right )}{a c f^{2} - a d e f - b c e f + b d e^{2}} + x \right )}}{2} + \frac {\sqrt {- \frac {1}{e f^{5}}} \left (a f - b e\right ) \left (c f - d e\right ) \log {\left (\frac {e f^{2} \sqrt {- \frac {1}{e f^{5}}} \left (a f - b e\right ) \left (c f - d e\right )}{a c f^{2} - a d e f - b c e f + b d e^{2}} + x \right )}}{2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x**2+a)*(d*x**2+c)/(f*x**2+e),x)

[Out]

b*d*x**3/(3*f) + x*(a*d/f + b*c/f - b*d*e/f**2) - sqrt(-1/(e*f**5))*(a*f - b*e)*(c*f - d*e)*log(-e*f**2*sqrt(-
1/(e*f**5))*(a*f - b*e)*(c*f - d*e)/(a*c*f**2 - a*d*e*f - b*c*e*f + b*d*e**2) + x)/2 + sqrt(-1/(e*f**5))*(a*f
- b*e)*(c*f - d*e)*log(e*f**2*sqrt(-1/(e*f**5))*(a*f - b*e)*(c*f - d*e)/(a*c*f**2 - a*d*e*f - b*c*e*f + b*d*e*
*2) + x)/2

________________________________________________________________________________________